package com.brsya.movie.model;

import com.brsya.base.base.Contents;
import com.brsya.base.bean.BaseListBean;
import com.brsya.base.bean.BaseObjectBean;
import com.brsya.base.bean.MovieListBean;
import com.brsya.base.net.RetrofitClient;
import com.brsya.movie.contract.MovieListContract;

import java.util.Map;

import io.reactivex.rxjava3.core.Observable;

/**
 * Created by Brsya
 * CreateDate: 2022/7/5  20:15
 * Description:
 * 影视列表数据层
 */
public class MovieListModel implements MovieListContract.Model {
    @Override
    public Observable<BaseObjectBean<MovieListBean>> getMovieList(Map<String, Object> par) {
        return RetrofitClient.getInstance().getApi().getMovieList(Contents.BASE_URL + "/home/getData", par);
    }

    @Override
    public Observable<BaseListBean<MovieListBean.ContentListDTO.VideoListDTO>> getNewMovieList(Map<String, Object> par) {
        return RetrofitClient.getInstance().getApi().getNewMovieList(Contents.BASE_URL + "/home/titlePage", par);
    }
}
